# Contributor: Celeste <cielesti@protonmail.com>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=py3-littleutils
pkgver=0.2.2
pkgrel=1
pkgdesc="Small personal collection of Python utility functions"
url="https://pypi.org/project/littleutils/"
arch="noarch"
license="MIT"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
subpackages="$pkgname-pyc"
source="https://github.com/alexmojaki/littleutils/archive/v$pkgver/py3-littleutils-$pkgver.tar.gz"
builddir="$srcdir/littleutils-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

# no test suite; use smoke test
check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -c 'from littleutils import *'
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
2f28ee7623e2b6b64281c7324bec2b164969d3c56d1bdeaac642bf71b5994f324dae426510acdd243869fe4c2802c5e58fb1806e8baece2b48f2a9155abcb555  py3-littleutils-0.2.2.tar.gz
"
